﻿using System;
using Inovout.Data.Domain;
using System.ComponentModel.DataAnnotations;

namespace Inovout.Membership.Security
{
    public partial class DynamicPasswordCredential : MembershipCredential
    {
        public DynamicPasswordCredential()
        {
        }

        [Required(ErrorMessage = "手机不可为空")]
        [StringLength(11, ErrorMessage = "邮箱长度不能超过11个字符")]
        [DataType(DataType.PhoneNumber)]
        [RegularExpression(@"^1[3|5|7|8|][0-9]{9}", ErrorMessage = "不是一个有效的手机号码")]
        [Alias("手机")]
        public virtual string Phone { get; set; }

        [Required(ErrorMessage = "验证码不可为空")]
        [StringLength(6, ErrorMessage = "验证码长度不能超过6个字符")]
        [Alias("验证码")]
        public virtual string Code { get; set; }

        //public virtual DateTime StartTime { get; set; }

        //public virtual int Duration { get; set; }

        //密码状态
       // public virtual ValidateState State { get; set; }

        //比对结果
        //public virtual ValidateState ResultState { get; set; }

        //public virtual HandleResult HandleResult { get; set; }
    }
}
